#ifndef __IM_EVENT_TYPES_H__
#define __IM_EVENT_TYPES_H__

#include <im_base_types.h>

/**
 * @defgroup IMEventTypes
 * @ingroup PublicIME
 * @{
 */

IM_BEGIN_DECLS

/**
 * Description of the comment format:
 *
 * - Can broadcast
 *   Indicates if the event can be broadcasted or not. If the event can be
 *   broadcasted, then Dest ID of the event can be set to
 *   IM_EVENT_DEST_BROADCAST.
 */
enum
{
    /** Indicates invalid event. */
    IM_EVENT_INVALID        = 0,

    /**
     * Asks IMBUS to load a component module.
     *
     * An IMBUS component shall send this event to IMBUS if it wants to load an
     * external component module.
     * Upon receiving this event, IMBUS will load the specified module and run
     * it in a separated process.
     * IMBUS won't send reply to indicate if the module is loaded successfully.
     * The component shall check if the module has been loaded by itself, by
     * using IM_EVENT_QUERY_COMPONENTS event or sending private event to the
     * components provided by the module.
     *
     * This event might be handled by an external module manager instead of
     * IMBUS itself.
     *
     * Possible producer: any components
     * Possible consumer: IMBUS
     * Possible observer: any components
     *
     * Can broadcast: No
     *
     * Source ID: ID of the component, which sends this event
     *   Dest ID: shall be IM_EVENT_DEST_IMBUS
     *      ICID: shall be IM_EVENT_INPUT_CONTEXT_NONE
     *
     * Data:
     * - IMString
     *   Name or file URI of the module to be loaded.
     *
     * Has reply event: No
     */
    IM_EVENT_LOAD_MODULE,

    /**
     * Asks IMBUS to unload a component module.
     *
     * An IMBUS component shall send this event to IMBUS if it wants to unload an
     * external component module previously loaded by itself.
     * Upon receiving this event, IMBUS will unload the specified module.
     * A component can only unload modules loaded by itself.
     *
     * This event might be handled by an external module manager instead of
     * IMBUS itself.
     *
     * Possible producer: any components
     * Possible consumer: IMBUS
     * Possible observer: any components
     *
     * Can broadcast: No
     *
     * Source ID: ID of the component, which sends this event
     *   Dest ID: shall be IM_EVENT_DEST_IMBUS
     *      ICID: shall be IM_EVENT_INPUT_CONTEXT_NONE
     *
     * Data:
     * - IMString
     *   Name or file URI of the module to be unloaded.
     *
     * Has reply event: No
     */
    IM_EVENT_UNLOAD_MODULE,

    /**
     * Registers a component into IMBUS
     *
     * An IMBUS client should send an event with this type as soon as it connects
     * to IMBUS, to register its component into IMBUS. If the client has more
     * than one components, then multiple events with this type should be sent
     * to IMBUS to register each component.
     *
     * Possible producer: any components
     * Possible consumer: IMBUS
     * Possible observer: any components
     *
     * Can broadcast: No
     *
     * Source ID: shall be IM_EVENT_SOURCE_INVALID
     *   Dest ID: shall be IM_EVENT_DEST_IMBUS
     *      ICID: shall be IM_EVENT_INPUT_CONTEXT_NONE
     *
     * Data:
     * - IMComponentInfo object
     *   containing necessary information of the component.
     *
     * Has reply event: Yes
     * Reply data:
     * - IMString
     *   Unique string ID of the component to be registered.
     *
     * If the component was registered into IMBUS successfully, then the Dest
     * ID of the replied event is the unique ID allocated to the component by
     * IMBUS. The component shall store the dest ID and use it later as source
     * ID for any events sent to IMBUS.
     */
    IM_EVENT_REGISTER_COMPONENT,

    /**
     * Deregisters a component from IMBUS
     *
     * An event with this type shall be sent to IMBUS if an IMBUS client wants
     * to deregister its component from IMBUS.
     *
     * The source component, which sends this event, will be deregistered by
     * IMBUS.
     *
     * Possible producer: any components
     * Possible consumer: IMBUS
     * Possible observer: any components
     *
     * Can broadcast: No
     *
     * Source ID: ID of the component, which sends this event
     *   Dest ID: shall be IM_EVENT_DEST_IMBUS
     *      ICID: shall be IM_EVENT_INPUT_CONTEXT_NONE
     *
     * Data: no data
     * Has reply event: No
     */
    IM_EVENT_DEREGISTER_COMPONENT,

    /**
     * Queries information of one or more components
     *
     * An event with this type shall be sent to IMBUS, if an IMBUS component
     * wants to query the information of one or more components registered
     * in IMBUS.
     *
     * Possible producer: any components
     * Possible consumer: IMBUS
     * Possible observer: any components
     *
     * Can broadcast: No
     *
     * Source ID: ID of the component, which sends this event
     *   Dest ID: shall be IM_EVENT_DEST_IMBUS
     *      ICID: shall be IM_EVENT_INPUT_CONTEXT_NONE
     *
     * Data: One of following data types:
     * - IMUInt32 (one or more)
     *   One or more component IDs to be queried.
     *   If want to query the information of all components,
     *   IM_EVENT_DEST_BROADCAST shall be used.
     *   If IM_EVENT_DEST_IMBUS is specified, the information of IMBUS itself
     *   will be returned.
     * - IMString (one or more)
     *   One or more component unique string IDs to be queried.
     *   If an empty IMString object is specified, information of all
     *   components with empty string id will be returned.
     * - IMEventRoles object
     *   Query the information of all components which support the specified
     *   event roles.
     *
     * Has reply event: Yes
     * - IMComponentInfo object (one or more)
     *   The information of each component that meet the criteria.
     *   If the specified component ID is invalid, then an IMBool with value
     *   FALSE will be returned.
     *   When returning the information of IMBUS itself, only IMEventRoles
     *   object in this object is meaningful.
     */
    IM_EVENT_QUERY_COMPONENTS,

    /**
     * Updates the information of a component, including component's event
     * roles.
     *
     * An event with this type shall be sent to IMBUS, if an IMBUS component
     * wants to update its information registered in IMBUS.
     *
     * Possible producer: any components
     * Possible consumer: IMBUS
     * Possible observer: any components
     *
     * Can broadcast: No
     *
     * Source ID: ID of the component, which sends this event
     *   Dest ID: shall be IM_EVENT_DEST_IMBUS
     *      ICID: shall be IM_EVENT_INPUT_CONTEXT_NONE
     *
     * Data:
     * - IMComponentInfo
     *   An IMComponentInfo object contains the information of the component,
     *   including the event roles supported by the component.
     *
     * Has reply event: No
     */
    IM_EVENT_UPDATE_COMPONENT_INFO,

    /**
     * Registers properties of a component
     *
     * An event with this type shall be sent to IMBUS, if an IMBUS component
     * wants to register some properties to IMBUS and UI component.
     *
     * Possible producer: any components
     * Possible consumer: UI components and IMBUS
     * Possible observer: any components
     *
     * Can broadcast: No
     *
     * Source ID: ID of the component, which sends this event
     *   Dest ID: IM_EVENT_DEST_DEFAULT shall be used if it wants to let IMBUS
     *            choose the prefered UI comopnent.
     *            ID of a specified UI component shall be used if it wants to
     *            use a specified UI component to handle this event.
     *      ICID: Uses IM_EVENT_INPUT_CONTEXT_NONE, if the properties are bound
     *            to the source component. Or uses a valid input context id, if
     *            the properties are bound to the specified input context.
     *
     * Upon receiving this event, IMBUS will record the properties for future
     * query, and then deliver this event to the specified UI component.
     * When the specified UI component receives this event, it has
     * responsiblity to display the properties.
     * Properties bound to a component shall be shown by UI component until
     * they are deregistered.
     * Properties bound to an input context shall only be shown by UI component
     * when the input context is focused.
     * If an IMPropList object has already been registered for the component or
     * input method, the old IMPropList object will be removed before
     * registering the new IMPropList object.
     *
     * Data:
     * - IMPropList
     *   An IMPropList object contains the properties to be registered.
     *
     * Has reply event: No
     */
    IM_EVENT_REGISTER_PROPERTIES,

    /**
     * Deregisters properties of a component
     *
     * An event with this type shall be sent to IMBUS, if an IMBUS component
     * wants to deregister its properties.
     *
     * Possible producer: any components or IMBUS.
     * Possible consumer: UI components and IMBUS
     * Possible observer: any components
     *
     * Can broadcast: No
     *
     * Source ID: ID of the component, which sends this event
     *   Dest ID: IM_EVENT_DEST_DEFAULT shall be used if it wants to let IMBUS
     *            choose the prefered UI comopnent.
     *            ID of a specified UI component shall be used if it wants to
     *            use a specified UI component to handle this event.
     *      ICID: Uses IM_EVENT_INPUT_CONTEXT_NONE, if the properties are bound
     *            to the source component. Or uses a valid input context id, if
     *            the properties are bound to the specified input context.
     *
     * Upon receiving the event, IMBUS will remove corresponding record and
     * then deliver the event to corresponding UI component.
     *
     * If a component is deregistered or an input context is deleted with some
     * properties registered, then IMBUS will sent out this event to
     * corresponding UI component, so that UI component can deregister the
     * properties correctly.
     *
     * Data: No
     * Has reply event: No
     */
    IM_EVENT_DEREGISTER_PROPERTIES,

    /**
     * Updates information of one or more properties
     *
     * An event with this type shall be sent to IMBUS, if an IMBUS component
     * wants to update one or more of its properties.
     *
     * Possible producer: any components
     * Possible consumer: UI components and IMBUS
     * Possible observer: any components
     *
     * Can broadcast: No
     *
     * Source ID: ID of the component, which sends this event
     *   Dest ID: IM_EVENT_DEST_DEFAULT shall be used if want to let IMBUS
     *            choose the prefered comopnent.
     *            ID of a specified UI component shall be used if it wants to
     *            use a specified UI component to handle this event.
     *      ICID: Uses IM_EVENT_INPUT_CONTEXT_NONE, if the properties are bound
     *            to the source component. Or uses a valid input context id, if
     *            the properties are bound to the specified input context.
     *
     * Upon receiving this event, IMBUS will update internal record, then
     * deliver this event to corresponding UI component.
     *
     * Data: one or more IMProperty object
     * - The properties that need to update.
     *
     * Has reply event: No
     */
    IM_EVENT_UPDATE_PROPERTIES,

    /**
     * Query the properties bound to a component or an input context.
     *
     * An event with this type shall be sent to IMBUS, if an IMBUS component
     * wants to query the properties bound to a specified component or input
     * context.
     *
     * Possible producer: any components
     * Possible consumer: IMBUS
     * Possible observer: any components
     *
     * Can broadcast: No
     *
     * Source ID: ID of the component, which sends this event
     *   Dest ID: IM_EVENT_DEST_IMBUS shall be used.
     *      ICID: Uses IM_EVENT_INPUT_CONTEXT_NONE, if the properties are bound
     *            to the source component. Or uses a valid input context id, if
     *            the properties are bound to the specified input context.
     *
     * Upon receiving this event, IMBUS will send the corresponding IMPropList
     * object back to the source component.
     *
     * Data: None
     *
     * Has reply event: Yes
     * - IMPropList object associated to specified component or input context.
     *   Or IMBool = FALSE, if there is no associated properties.
     */
    IM_EVENT_QUERY_PROPERTIES,

    /**
     * Registers hotkey profiles of an IMBUS component
     *
     * An event with this type shall be sent to IMBUS, if an IMBUS component
     * wants to register one or more hotkey profiles.
     *
     * If a hotkey profile with the same id was already registered before, then
     * it'll be replaced by the new one.
     *
     * Possible producer: any components
     * Possible consumer: IMBUS
     * Possible observer: any components
     *
     * Can broadcast: No
     *
     * Source ID: ID of the component, which sends this event
     *   Dest ID: shall be IM_EVENT_DEST_IMBUS
     *      ICID: shall be IM_EVENT_INPUT_CONTEXT_NONE
     *
     * Data:
     * - IMHotkeyProfile
     *   One or more IMHotkeyProfile objects to be registered.
     *
     * Has reply event: No
     */
    IM_EVENT_REGISTER_HOTKEY_PROFILES,

    /**
     * Deregisters hotkey profiles of a component
     *
     * An event with this type shall be sent to IMBUS, if an IMBUS component
     * wants to deregister one or more hotkey profiles.
     *
     * Possible producer: any components
     * Possible consumer: IMBUS
     * Possible observer: any components
     *
     * Can broadcast: No
     *
     * Source ID: ID of the component, which sends this event
     *   Dest ID: shall be IM_EVENT_DEST_IMBUS
     *      ICID: shall be IM_EVENT_INPUT_CONTEXT_NONE
     *
     * Data:
     * - IMUInt32
     *   One or more uids of corresponding IMHotkeyProfile objects which are
     *   going to be deregistered.
     *
     * Has reply event: No
     */
    IM_EVENT_DEREGISTER_HOTKEY_PROFILES,

    /**
     * Activates local and/or global hotkey profiles
     *
     * An event with this type shall be sent to IMBUS, if an IMBUS component
     * wants to set the active local and global hotkey profiles.
     *
     * Only one local and one global hotkey profile can be set active.
     *
     * Possible producer: any components
     * Possible consumer: IMBUS
     * Possible observer: any components
     *
     * Can broadcast: No
     *
     * Source ID: ID of the component, which sends this event
     *   Dest ID: shall be IM_EVENT_DEST_IMBUS
     *      ICID: shall be IM_EVENT_INPUT_CONTEXT_NONE
     *
     * Data:
     * - IMUInt32
     *   One or two uids of corresponding IMHotkeyProfile objects, which are
     *   already registered into IMBUS and to be activated. At most only one
     *   local profile and one global profile can be activated.
     *
     * Has reply event: No
     */
    IM_EVENT_ACTIVATE_HOTKEY_PROFILES,

    /**
     * Deactivates local and/or global hotkey profiles
     *
     * An event with this type shall be sent to IMBUS, if an IMBUS component
     * wants to deactivate the active local and global hotkey profiles.
     *
     * Possible producer: any components
     * Possible consumer: IMBUS
     * Possible observer: any components
     *
     * Can broadcast: No
     *
     * Source ID: ID of the component, which sends this event
     *   Dest ID: shall be IM_EVENT_DEST_IMBUS
     *      ICID: shall be IM_EVENT_INPUT_CONTEXT_NONE
     *
     * Data:
     * - IMUInt32
     *   One or two uids of corresponding IMHotkeyProfile objects to be
     *   deactivated , which are already registered into IMBUS and set as
     *   activated.
     *
     * Has reply event: No
     */
    IM_EVENT_DEACTIVATE_HOTKEY_PROFILES,

    IM_EVENT_QUERY_HOTKEY_PROFILES,

    /**
     * Sets active component for specified event roles
     *
     * An event with this type shall be sent to IMBUS, if an IMBUS component
     * wants to let a specified component consumes a specified set of events.
     *
     * If there are more than one consumers for a specified event, the one
     * which is activated will receive the event if the event destination is
     * set to IM_EVENT_DEST_DEFAULT.
     *
     * Only one component can be activated for a specified event.
     *
     * Possible producer: any components, though in common case, it's UI
     *                    component.
     * Possible consumer: IMBUS
     * Possible observer: any components
     *
     * Can broadcast: No
     *
     * Source ID: ID of the component, which sends this event
     *   Dest ID: shall be IM_EVENT_DEST_IMBUS
     *      ICID: shall be IM_EVENT_INPUT_CONTEXT_NONE
     *
     * Data:
     * - IMUInt32
     *   The component ID which will be activated
     * - IMEventRoles
     *   The default component of the events stored in this IMEventRoles object,
     *   which have consumer role assiged, will be set to the component
     *   specified by the component ID.
     *   All other event roles for these events and other events that don't
     *   have consumer event role do not have any effect.
     *
     * Have reply event: No
     */
    IM_EVENT_SET_ACTIVE_COMPONENT,

    /**
     * Gets active component for specified event roles
     *
     * An event with this type shall be sent to IMBUS, if an IMBUS component
     * wants to know which component is the default consumer of a specified
     * set of events.
     *
     * Possible producer: any components
     * Possible consumer: IMBUS
     * Possible observer: any components
     *
     * Can broadcast: No
     *
     * Source ID: ID of the component, which sends this event
     *   Dest ID: shall be IM_EVENT_DEST_IMBUS
     *      ICID: shall be IM_EVENT_INPUT_CONTEXT_NONE
     *
     * Data:
     * - IMEventRoles
     *   The events with consumer event role stored in this IMEventRoles object
     *   will be examined to see if their default components are same. If they
     *   are same then ID of the component will be returned.
     *
     * Have reply event: Yes
     * - IMUInt32
     *   ID of the default consumer component for the specified events. If
     *   there is no one default consumer component, IM_EVENT_SOURCE_INVALID
     *   will be returned.
     */
    IM_EVENT_GET_ACTIVE_COMPONENT,


    /**
     * Creates an input context.
     *
     * An event with this type shall be sent to IMBUS, if an application
     * component wants to create an input context.
     *
     * Possible producer: application components
     * Possible consumer: input method components and IMBUS
     * Possible observer: any components
     *
     * Can broadcast: No
     *
     * Source ID: ID of the component, which sends this event
     *   Dest ID: IM_EVENT_DEST_DEFAULT shall be used if it wants to let IMBUS
     *            choose the prefered input method comopnent.
     *            ID of a specified input method component shall be used if it
     *            wants to use a specified input method component to handle
     *            this event.
     *      ICID: shall be IM_EVENT_INPUT_CONTEXT_NONE
     *
     * Upon receiving this event, IMBUS will allocate an unique id of the newly
     * created input context and store it into the event, then IMBUS will
     * deliver the event to the specified input method component. After
     * returning successful reply from the input method component, IMBUS will
     * deliver the reply event back to the application component.
     * The reply event sent from the input method component should contain the
     * same input context ID allocated by IMBUS, because IMBUS will deliver it
     * back to the application without validating it.
     *
     * Data:
     * - IMString
     *   The encoding used by the application for this input context, shall be
     *   "UTF-8" for most case. Input method component shall convert the result
     *   string into this specified encoding before sending to the application.
     *
     * Has reply event: Yes
     * - IMBool
     *   TRUE if the input context was created successfully.
     */
    IM_EVENT_CREATE_INPUT_CONTEXT,

    /**
     * Deletes an input context
     *
     * An event with this type shall be sent to IMBUS, if an application
     * component wants to delete an input context.
     *
     * Possible producer: application components
     * Possible consumer: input method components and IMBUS
     * Possible observer: any components
     *
     * Can broadcast: No
     *
     * Source ID: ID of the component, which sends this event
     *   Dest ID: IM_EVENT_DEST_DEFAULT shall be used.
     *      ICID: ID of the input context to be deleted.
     *
     * Upon receiving this event, IMBUS will deliver this event to the
     * corresponding input method component bound to the input context.
     *
     * Data: None
     * Has reply event: No
     */
    IM_EVENT_DELETE_INPUT_CONTEXT,

    /**
     * Queries information of an input context
     *
     * An event with this type shall be sent to IMBUS, if a component wants to
     * know the information of a specified input context.
     *
     * Possible producer: application components
     * Possible consumer: IMBUS
     * Possible observer: any components
     *
     * Can broadcast: No
     *
     * Source ID: ID of the component, which sends this event
     *   Dest ID: IM_EVENT_DEST_IMBUS shall be used.
     *      ICID: ID of the input context to be queried. Special input context
     *            id IM_INPUT_CONTEXT_FOCUSED shall be used.
     *
     * Data: None
     *
     * Has reply event: Yes
     *
     * If the specified input context is valid, then following data will be
     * returned:
     * - IMComponentInfo
     *   Information of the input method component bound to this input method.
     * - IMComponentInfo
     *   Information of the application component bound to this input method.
     *
     * Otherwise, following data will be returned:
     * - IMBool FALSE
     *
     */
    IM_EVENT_QUERY_INPUT_CONTEXT,

    /**
     * Sets focus to a specified input context.
     *
     * An event with this type shall be sent to IMBUS, if a component
     * wants to set focus to a specified input context.
     *
     * Possible producer: application components
     * Possible consumer: input method components and IMBUS
     * Possible observer: any components
     *
     * Can broadcast: Yes.
     *
     * Source ID: ID of the component, which sends this event
     *   Dest ID: IM_EVENT_DEST_DEFAULT shall be used.
     *      ICID: ID of the input context to be focused.
     *
     * If there is already a focused input context, IMBUS will first send a
     * unset focus event to the input method component (and maybe application
     * component as well) bound to this already focused input context. Then
     * IMBUS will deliver this set focus event to the input method component
     * (and maybe application component as well) bound to the input context
     * specified in this event.
     *
     * Data: None
     * Has reply event: No
     */
    IM_EVENT_SET_FOCUSED_INPUT_CONTEXT,

    /**
     * Unsets focus from a specified input context
     *
     * An event with this type shall be sent to IMBUS, if a component
     * wants to unset focus to a specified input context.
     *
     * Possible producer: application components and IMBUS
     * Possible consumer: input method components and IMBUS
     * Possible observer: any components
     *
     * Can broadcast: Yes.
     *
     * Source ID: ID of the component, which sends this event
     *   Dest ID: IM_EVENT_DEST_DEFAULT shall be used.
     *      ICID: ID of the input context to be unfocused.
     *
     * Upon receiving this event, IMBUS will deliver it to the input method
     * component (and maybe the application component as well) bound to the
     * specified input context.
     *
     * Data: None
     * Has reply event: No
     */
    IM_EVENT_UNSET_FOCUSED_INPUT_CONTEXT,

    /**
     * Resets an input context
     *
     * An event with this type shall be sent to IMBUS, if a component wants to
     * reset the state of a specified input context.
     *
     * Possible producer: application components, though other components may
     *                    also possible.
     * Possible consumer: input method components, and maybe application
     *                    components
     * Possible observer: any components
     *
     * Can broadcast: Yes.
     *
     * Source ID: ID of the component, which sends this event
     *   Dest ID: IM_EVENT_DEST_DEFAULT shall be used.
     *      ICID: ID of the input context to be reset.
     *
     * Upon receiving this event, IMBUS will deliver it to the input method
     * component (and maybe the application component as well) bound to the
     * specified input context.
     *
     * Data: None
     * Has reply event: No
     */
    IM_EVENT_RESET_INPUT_CONTEXT,


    /**
     * Sents a key event from application to input method
     *
     * An event with this type shall be sent to IMBUS, if an application
     * component wants to send a keyboard event to an input method component
     * for processing.
     *
     * Possible producer: application components
     * Possible consumer: input method components and IMBUS
     * Possible observer: any components
     *
     * Can broadcast: No.
     *
     * Source ID: ID of the application component, which sends this event
     *   Dest ID: IM_EVENT_DEST_DEFAULT shall be used.
     *      ICID: ID of the input context on which the keyboard event is
     *            occurred.
     *
     * Upon receiving this event, IMBUS will first check the event against the
     * local active hotkey profiles bound to the specified input context's
     * input method component and application component, then check it against
     * all global active hotkey profiles registered by all components. If a
     * hotkey matches the keyboard event, then the event associated to the
     * hotkey will be delivered, and a success reply will be sent back to the
     * source application component.
     * If no hotkey matches the keyboard event, then IMBUS will deliver the
     * event to corresponding input method component bound to the specified
     * input context.
     *
     * Data:
     * - IMUInt32
     *   Keycode of the keyboard event.
     *
     * Has reply event: Yes
     * - IMBool
     *   TRUE if the keyboard event was consumed, and the source application
     *   shall not use it anymore.
     *   FALSE if the keyboard event was not consumed, the source application
     *   may use it.
     */
    IM_EVENT_PROCESS_KEY_EVENT,

    /**
     * Triggers a property of a component
     *
     * An event with this type shall be sent to IMBUS by an UI component,
     * if user triggers a property of another component on this US component.
     *
     * Possible producer: UI components
     * Possible consumer: any components
     * Possible observer: any components
     *
     * Can broadcast: No.
     *
     * Source ID: ID of the UI component, which sends this event
     *   Dest ID: ID of the component which owns the property.
     *      ICID: ID of the input context associated to the property.
     *
     * Data:
     * - IMString
     *   Unique string key of the triggerred property.
     *
     * Has reply event: No
     */
    IM_EVENT_TRIGGER_PROPERTY,

    /**
     * Clicks on the preedit string
     *
     * An event with this type shall be sent to IMBUS, if user clicks on the
     * preedit string shown by an UI component.
     *
     * Possible producer: UI components
     * Possible consumer: input method components
     * Possible observer: any components
     *
     * Can broadcast: No.
     *
     * Source ID: ID of the UI component, which sends this event
     *   Dest ID: IM_EVENT_DEST_DEFAULT shall be used.
     *      ICID: ID of the input context which owns the preedit string.
     *
     * Data:
     * - IMUInt32 - click type, 1 means single click, 2 means double click.
     * - IMUInt32 - index of clicked character in the preedit string, starts
     *              from 0.
     *
     * Has reply event: No
     */
    IM_EVENT_CLICK_ON_PREEDIT_STRING,

    /**
     * Clicks on a lookup table candidate
     *
     * An event with this type shall be sent to IMBUS, if user clicks on a
     * candidate in a lookup table.
     *
     * Possible producer: UI components
     * Possible consumer: input method components
     * Possible observer: any components
     *
     * Can broadcast: No.
     *
     * Source ID: ID of the UI component, which sends this event
     *   Dest ID: IM_EVENT_DEST_DEFAULT shall be used.
     *      ICID: ID of the input context which owns the lookup table.
     *
     * Data:
     * - IMUInt32 - uid of the clicked lookup table.
     * - IMUInt32 - click type, 1 means single click, 2 means double click.
     * - IMUInt32 - index of clicked candidate in specified lookup table, starts
     *              from 0.
     *
     * Has reply event: No
     */
    IM_EVENT_CLICK_ON_LOOKUP_TABLE_CANDIDATE,

    /**
     * Clicks on next page button of a lookup table
     *
     * An event with this type shall be sent to IMBUS, if user clicks on the
     * next page button of a lookup table.
     *
     * Possible producer: UI components
     * Possible consumer: input method components
     * Possible observer: any components
     *
     * Can broadcast: No.
     *
     * Source ID: ID of the UI component, which sends this event
     *   Dest ID: IM_EVENT_DEST_DEFAULT shall be used.
     *      ICID: ID of the input context which owns the lookup table.
     *
     * Data:
     * - IMUInt32 - uid of the clicked lookup table.
     * - IMUInt32 - click type, 1 means single click, 2 means double click.
     *
     * Has reply event: No
     */
    IM_EVENT_CLICK_ON_LOOKUP_TABLE_NEXT_PAGE,

    /**
     * Clicks on previous page button of a lookup table
     *
     * An event with this type shall be sent to IMBUS, if user clicks on the
     * previous page button of a lookup table.
     *
     * Possible producer: UI components
     * Possible consumer: input method components
     * Possible observer: any components
     *
     * Can broadcast: No.
     *
     * Source ID: ID of the UI component, which sends this event
     *   Dest ID: IM_EVENT_DEST_DEFAULT shall be used.
     *      ICID: ID of the input context which owns the lookup table.
     *
     * Data:
     * - IMUInt32 - uid of the clicked lookup table.
     * - IMUInt32 - click type, 1 means single click, 2 means double click.
     *
     * Has reply event: No
     */
    IM_EVENT_CLICK_ON_LOOKUP_TABLE_PREV_PAGE,

    /**
     * Clicks on scroll bar of a lookup table
     *
     * An event with this type shall be sent to IMBUS, if user clicks on the
     * scroll bar of a lookup table.
     *
     * Possible producer: UI components
     * Possible consumer: input method components
     * Possible observer: any components
     *
     * Can broadcast: No.
     *
     * Source ID: ID of the UI component, which sends this event
     *   Dest ID: IM_EVENT_DEST_DEFAULT shall be used.
     *      ICID: ID of the input context which owns the lookup table.
     *
     * Data:
     * - IMUInt32 - uid of the clicked lookup table.
     * - IMUInt32 - click type, 1 means single click, 2 means double click.
     * - IMUInt32
     *   click position in the scroll range, between 0 to (num_pages-1),
     *   @sa im_lookup_table_set_scroll_info().
     *
     *
     * Has reply event: No
     */
    IM_EVENT_CLICK_ON_LOOKUP_TABLE_SCROLL_BAR,

    /**
     * Page size of lookup table was adjusted by UI component
     *
     * An event with this type shall be sent to IMBUS, if UI component wants to
     * adjust the page size of a lookup table, due to some reason (eg. the
     * screen is too small to display the whole page).
     *
     * Possible producer: UI components
     * Possible consumer: input method components
     * Possible observer: any components
     *
     * Can broadcast: No.
     *
     * Source ID: ID of the UI component, which sends this event
     *   Dest ID: IM_EVENT_DEST_DEFAULT shall be used.
     *      ICID: ID of the input context which owns the lookup table.
     *
     * Data:
     * - IMUInt32 - uid of the lookup table to be adjusted.
     * - IMUInt32 - number of columns of new page size.
     * - IMUInt32 - number of rows of new page size.
     */
    IM_EVENT_ADJUST_LOOKUP_TABLE_PAGE_SIZE,


    /**
     * Updates the location of currently focused input spot on the screen.
     *
     * An event with this type shall be sent to IMBUS, if application
     * component wants to update the location of currently focused input spot
     * on the screen.
     *
     * Possible producer: application components
     * Possible consumer: UI components
     * Possible observer: any components
     *
     * Can broadcast: Must.
     *
     * Source ID: ID of the application component, which sends this event
     *   Dest ID: IM_EVENT_DEST_BROADCAST shall be used.
     *      ICID: ID of the input context for which the spot location is
     *            updated. It must be the focused input context.
     *
     * Data:
     * - IMUInt32 - X position of input spot.
     * - IMUInt32 - Y position of input spot.
     */
    IM_EVENT_UPDATE_SPOT_LOCATION,

    /**
     * Updates the screen of currently focused input spot.
     *
     * An event with this type shall be sent to IMBUS, if application
     * component wants to update the screen of currently focused input spot.
     *
     * Possible producer: application components
     * Possible consumer: UI components
     * Possible observer: any components
     *
     * Can broadcast: Must.
     *
     * Source ID: ID of the application component, which sends this event
     *   Dest ID: IM_EVENT_DEST_BROADCAST shall be used.
     *      ICID: ID of the input context for which the screen is updated.
     *            It must be the focused input context.
     *
     * Data:
     * - IMUInt32 - number of the new screen.
     */
    IM_EVENT_UPDATE_SCREEN,


    /**
     * Asks an UI or application component to show preedit text.
     *
     * An event with this type shall be sent to IMBUS, if input method
     * component wants to show preedit text on the screen.
     *
     * Only focused input context can show preedit text.
     *
     * Possible producer: input method components
     * Possible consumer: UI or application components
     * Possible observer: any components
     *
     * Can broadcast: No.
     *
     * Source ID: ID of the input method component, which sends this event
     *   Dest ID: IM_EVENT_DEST_DEFAULT shall be used.
     *      ICID: ID of the input context, which wants to show preedit text.
     *
     * Data:
     * - IMText (optional)
     *   Initial preedit string content. If it's omitted, an empty preedit
     *   string will be shown.
     * - IMUInt32 (optional)
     *   Initial preedit caret position in the specified preedit string, in
     *   number of characters counting from begining.
     *   If the first parameter is omitted, this parameter shall be omitted as
     *   well, or the value must be zero.
     *   If the value is greater than or equal to the length of specified
     *   preedit string, then the preedit caret will be at the end of preedit
     *   string.
     *
     * Has reply event: No
     */
    IM_EVENT_SHOW_PREEDIT_TEXT,

    /**
     * Asks an UI or application component to hide preedit text.
     *
     * An event with this type shall be sent to IMBUS, if input method
     * component wants to hide preedit text from the screen.
     *
     * Possible producer: input method components
     * Possible consumer: UI or application components
     * Possible observer: any components
     *
     * Can broadcast: No.
     *
     * Source ID: ID of the input method component, which sends this event
     *   Dest ID: IM_EVENT_DEST_DEFAULT shall be used.
     *      ICID: ID of the input context, which wants to hide preedit text.
     *
     * Data: None
     *
     * Has reply event: No
     */
    IM_EVENT_HIDE_PREEDIT_TEXT,

    /**
     * Asks an UI or application component to update the content of preedit
     * text.
     *
     * An event with this type shall be sent to IMBUS, if input method
     * component wants to update the content of preedit text.
     *
     * Possible producer: input method components
     * Possible consumer: UI or application components
     * Possible observer: any components
     *
     * Can broadcast: No.
     *
     * Source ID: ID of the input method component, which sends this event
     *   Dest ID: IM_EVENT_DEST_DEFAULT shall be used.
     *      ICID: ID of the input context, which wants to update preedit text.
     *
     * Data:
     * - IMText (optional)
     *   New preedit string content. If it's omitted, an empty preedit text
     *   will be shown.
     * - IMUInt32 (optional)
     *   New preedit caret position in the new preedit text, in number of
     *   characters counting from begining.
     *   If the first parameter is omitted, this parameter shall be omitted as
     *   well, or the value must be zero.
     *   If the value is greater than or equal to the length of specified
     *   preedit text, then the preedit caret will be at the end of preedit
     *   text.
     *
     * Has reply event: No
     */
    IM_EVENT_UPDATE_PREEDIT_TEXT,

    /**
     * Asks an UI or application component to update the position of preedit
     * caret.
     *
     * An event with this type shall be sent to IMBUS, if input method
     * component wants to update the position of preedit caret.
     *
     * Possible producer: input method components
     * Possible consumer: UI or application components
     * Possible observer: any components
     *
     * Can broadcast: No.
     *
     * Source ID: ID of the input method component, which sends this event
     *   Dest ID: IM_EVENT_DEST_DEFAULT shall be used.
     *      ICID: ID of the input context, which wants to update preedit caret.
     *
     * Data:
     * - IMUInt32
     *   New preedit caret position in current preedit text, in number of
     *   characters counting from begining.
     *   If the value is greater than or equal to the length of preedit text,
     *   then the preedit caret will be at the end of preedit text.
     *
     * Has reply event: No
     */
    IM_EVENT_UPDATE_PREEDIT_CARET,


    /**
     * Asks an UI or application component to show auxiliary text.
     *
     * An event with this type shall be sent to IMBUS, if input method
     * component wants to show auxiliary text on the screen.
     *
     * The auxiliary string is a string displayed besides to the preedit text
     * to show some supplementary information.
     *
     * Possible producer: input method components
     * Possible consumer: UI or application components
     * Possible observer: any components
     *
     * Can broadcast: No.
     *
     * Source ID: ID of the input method component, which sends this event
     *   Dest ID: IM_EVENT_DEST_DEFAULT shall be used.
     *      ICID: ID of the input context, which wants to show auxiliary
     *            text.
     *
     * Data:
     * - IMText (optional)
     *   Initial auxiliary text content. If it's omitted, an empty auxiliary
     *   text will be shown.
     *
     * Has reply event: No
     */
    IM_EVENT_SHOW_AUXILIARY_TEXT,

    /**
     * Asks an UI or application component to hide auxiliary text.
     *
     * An event with this type shall be sent to IMBUS, if input method
     * component wants to hide auxiliary text from the screen.
     *
     * Possible producer: input method components
     * Possible consumer: UI or application components
     * Possible observer: any components
     *
     * Can broadcast: No.
     *
     * Source ID: ID of the input method component, which sends this event
     *   Dest ID: IM_EVENT_DEST_DEFAULT shall be used.
     *      ICID: ID of the input context, which wants to hide auxiliary
     *            text.
     *
     * Data: None
     *
     * Has reply event: No
     */
    IM_EVENT_HIDE_AUXILIARY_TEXT,

    /**
     * Asks an UI or application component to update the content of auxiliary
     * text.
     *
     * An event with this type shall be sent to IMBUS, if input method
     * component wants to update the content of auxiliary text.
     *
     * Possible producer: input method components
     * Possible consumer: UI or application components
     * Possible observer: any components
     *
     * Can broadcast: No.
     *
     * Source ID: ID of the input method component, which sends this event
     *   Dest ID: IM_EVENT_DEST_DEFAULT shall be used.
     *      ICID: ID of the input context, which wants to update auxiliary
     *            text.
     *
     * Data:
     * - IMText (optional)
     *   New auxiliary text content. If it's omitted, an empty auxiliary
     *   text will be shown.
     *
     * Has reply event: No
     */
    IM_EVENT_UPDATE_AUXILIARY_TEXT,


    /**
     * Asks an UI or application component to show lookup table.
     *
     * An event with this type shall be sent to IMBUS, if input method
     * component wants to show lookup table on the screen.
     *
     * Only the focused input context can show or hide lookup table, and only
     * one lookup table can be shown for an input context. Additional lookup
     * tables can be attached to candidates of the main lookup table as
     * annotations, and shown by UI component automatically.
     *
     * Possible producer: input method components
     * Possible consumer: UI or application components
     * Possible observer: any components
     *
     * Can broadcast: No.
     *
     * Source ID: ID of the input method component, which sends this event
     *   Dest ID: IM_EVENT_DEST_DEFAULT shall be used.
     *      ICID: ID of the input context, which wants to show lookup table.
     *
     * Data:
     * - IMLookupTable (optional)
     *   Initial lookup table to be shown. If it's omitted, an empty lookup
     *   table will be shown.
     *
     * Has reply event: No
     */
    IM_EVENT_SHOW_LOOKUP_TABLE,

    /**
     * Asks an UI or application component to hide lookup table.
     *
     * An event with this type shall be sent to IMBUS, if input method
     * component wants to hide lookup table on the screen.
     *
     * Only the focused input context can show or hide lookup table, and only
     * one lookup table can be shown for an input context. Additional lookup
     * tables can be attached to candidates of the main lookup table as
     * annotations, and shown by UI component automatically.
     *
     * Possible producer: input method components
     * Possible consumer: UI or application components
     * Possible observer: any components
     *
     * Can broadcast: No.
     *
     * Source ID: ID of the input method component, which sends this event
     *   Dest ID: IM_EVENT_DEST_DEFAULT shall be used.
     *      ICID: ID of the input context, which wants to show lookup table.
     *            It shall be currently focused.
     *
     * Data:
     * - IMUInt32
     *   ID of the IMLookupTable object to be hidden.
     *
     * Has reply event: No
     */
    IM_EVENT_HIDE_LOOKUP_TABLE,

    /**
     * Asks an UI or application component to update the content of a
     * lookup table.
     *
     * An event with this type shall be sent to IMBUS, if input method
     * component wants to update the content of a lookup table shown on
     * the screen.
     *
     * Only the focused input context can show or hide lookup table, and only
     * one lookup table can be shown for an input context. Additional lookup
     * tables can be attached to candidates of the main lookup table as
     * annotations, and shown by UI component automatically.
     *
     * Possible producer: input method components
     * Possible consumer: UI or application components
     * Possible observer: any components
     *
     * Can broadcast: No.
     *
     * Source ID: ID of the input method component, which sends this event
     *   Dest ID: IM_EVENT_DEST_DEFAULT shall be used.
     *      ICID: ID of the input context, which wants to update lookup table.
     *
     * Data:
     * - IMLookupTable
     *   New lookup table to be shown. If it's omitted, an empty lookup
     *   table will be shown.
     *
     * Has reply event: No
     */
    IM_EVENT_UPDATE_LOOKUP_TABLE,

    /**
     * Asks an application component to commit a text to a specified input
     * context.
     *
     * An event with this type shall be sent to IMBUS, if an input method
     * component wants to let an application component to commit a text to
     * a specified input context.
     *
     * Possible producer: input method components (other component is possible)
     * Possible consumer: application components
     * Possible observer: any components
     *
     * Can broadcast: No.
     *
     * Source ID: ID of the input method component, which sends this event
     *   Dest ID: IM_EVENT_DEST_DEFAULT shall be used.
     *      ICID: ID of the input context, which the text will be committed
     *            to.
     *
     * Data:
     * - IMText
     *   A text to be committed. In most case attributes in the text will be
     *   discarded by the application. However, a special designed application
     *   may consume the attributes.
     *
     * Has reply event: No
     */
    IM_EVENT_COMMIT_TEXT,

    /**
     * Asks an application component to forward a key event to a specified
     * input context.
     *
     * An event with this type shall be sent to IMBUS, if an input method or
     * other component wants to let an application component to forward a key
     * event to a specified input context.
     *
     * Possible producer: input method components (other component is possible)
     * Possible consumer: application components
     * Possible observer: any components
     *
     * Can broadcast: No.
     *
     * Source ID: ID of the input method component, which sends this event
     *   Dest ID: IM_EVENT_DEST_DEFAULT shall be used.
     *      ICID: ID of the input context, which the key event will be
     *            forwarded to.
     *
     * Data:
     * - IMUInt32
     *   A key event code will be forwarded.
     *
     * Has reply event: No
     */
    IM_EVENT_FORWARD_KEY_EVENT,

    /**
     * Retrieves text content surrounding the current input cursor in the
     * specified input context.
     *
     * An event with this type shall be sent to IMBUS, if an input method or
     * other component wants to retrieve text content surrounding the current
     * input cursor in the specified input context.
     *
     * Possible producer: input method components (other component is possible)
     * Possible consumer: application components
     * Possible observer: any components
     *
     * Can broadcast: No.
     *
     * Source ID: ID of the input method component, which sends this event
     *   Dest ID: IM_EVENT_DEST_DEFAULT shall be used.
     *      ICID: ID of the input context, which surrounding text will be
     *            retrieved.
     *
     * Data:
     * - IMInt32
     *   Maximum length of the text before input cursor shall be retrieved.
     *   -1 means unlimited.
     * - IMInt32
     *   Maximum length of the text after input cursor sall be retrieved.
     *   -1 means unlimited.
     *
     * Has reply event: Yes
     * - IMText
     *   Text content surrounding the input cursor in the specified input
     *   context. In most case the returned text won't have any attribute,
     *   however, a special designed application may attach attributes to the
     *   text, so that input method can use it.
     * - IMInt32
     *   Relative position of the input cursor in the returned text content,
     *   counted from the beginning of the text.
     *
     * If the application doesn't support retrieving surrounding text, a IMBool
     * with value FALSE shall be returned. The return event may be sent by
     * IMBUS, if the application can't consume this event.
     * If there is no surrounding text, an empty IMText object shall be
     * returned.
     */
    IM_EVENT_GET_SURROUNDING_TEXT,

    /**
     * Deletes a piece of text content surrounding the current input cursor in
     * the specified input context.
     *
     * An event with this type shall be sent to IMBUS, if an input method or
     * other component wants to delete a piece of text content surrounding the
     * current input cursor in the specified input context.
     *
     * Possible producer: input method components (other component is possible)
     * Possible consumer: application components
     * Possible observer: any components
     *
     * Can broadcast: No.
     *
     * Source ID: ID of the input method component, which sends this event
     *   Dest ID: IM_EVENT_DEST_DEFAULT shall be used.
     *      ICID: ID of the input context, which surrounding text will be
     *            deleted.
     *
     * Data:
     * - IMInt32
     *   Offset related to current input cursor, from which the text content
     *   will be deleted. If it's negative, then means it starts before current
     *   input cursor.
     * - IMInt32
     *   Length of the text content to be deleted, in number of characters.
     *
     * Has reply event: Yes
     * - IMBool
     *   TRUE if the text content is deleted successfully. Otherwise returns
     *   FALSE.
     */
    IM_EVENT_DELETE_SURROUNDING_TEXT,


    /**
     * Asks an UI component to show a list of components, so that user
     * can activate one of the components.
     *
     * An event with this type shall be sent to IMBUS, if a component
     * wants to let an UI component to show a list of components according to
     * a specified IMEventRoles object or a list of component IDs.
     *
     * Upon receving this event, the UI component shall query the information
     * of the components to be listed from IMBUS and then show the list on
     * screen.
     * When user select a component from the list, the UI component shall send
     * a IM_EVENT_SET_ACTIVE_COMPONENT event to IMBUS with the event roles
     * supported by the component.
     *
     * Possible producer: any components
     * Possible consumer: UI or application components
     * Possible observer: any components
     *
     * Can broadcast: No.
     *
     * Source ID: ID of the component, which sends this event
     *   Dest ID: IM_EVENT_DEST_DEFAULT, or id of a specified UI component.
     *      ICID: IM_EVENT_INPUT_CONTEXT_NONE shall be used.
     *
     * Data:
     *
     * Has reply event: No
     */
    IM_EVENT_SHOW_COMPONENTS_LIST,


    /**
     * Stores one or more arbitrary data into a storage component.
     *
     * An event with this type shall be sent to IMBUS, if a component wants to
     * store one or more arbitrary data into a storage component.
     *
     * Possible producer: any components
     * Possible consumer: storage components
     * Possible observer: any components
     *
     * Can broadcast: No.
     *
     * Source ID: ID of the component, which sends this event
     *   Dest ID: IM_EVENT_DEST_DEFAULT, or ID of a specified storage
     *            component.
     *      ICID: IM_EVENT_INPUT_CONTEXT_NONE shall be used.
     *
     * Data:
     * - IMString
     *   An unified string key associated to the stored data, which can be used
     *   to retrieve the data.
     *   The string key must be unique in the storage component. Otherwise, the
     *   old data associated to this key will be erased.
     *   Only alphabets, digitals, underscore, minus and slash can be used in a
     *   key. The key is case sensitive.
     * - Arbitrary data to be stored.
     *
     * Has reply event: No
     */
    IM_EVENT_STORAGE_STORE,

    /**
     * Retrieves data from a storage component by a specified key.
     *
     * An event with this type shall be sent to IMBUS, if a component wants to
     * retrieve data from a storage component.
     *
     * Possible producer: any components
     * Possible consumer: storage components
     * Possible observer: any components
     *
     * Can broadcast: No.
     *
     * Source ID: ID of the component, which sends this event
     *   Dest ID: IM_EVENT_DEST_DEFAULT, or ID of a specified storage
     *            component.
     *      ICID: IM_EVENT_INPUT_CONTEXT_NONE shall be used.
     *
     * Data:
     * - IMString
     *   An unified string key associated to the stored data, which are going
     *   to be retrieved.
     *
     * Has reply event: Yes
     * - IMBool
     *   TRUE if the data were retrieved successfully. Otherwise returns FALSE.
     * - Arbitrary retrieved data.
     *   Only available when the data are retrieved successfully.
     */
    IM_EVENT_STORAGE_RETRIEVE,

    /**
     * Deletes one or more data from a storage component by a specified key.
     *
     * An event with this type shall be sent to IMBUS, if a component wants to
     * delete data from a storage component.
     *
     * Possible producer: any components
     * Possible consumer: storage components
     * Possible observer: any components
     *
     * Can broadcast: No.
     *
     * Source ID: ID of the component, which sends this event
     *   Dest ID: IM_EVENT_DEST_DEFAULT, or ID of a specified storage
     *            component.
     *      ICID: IM_EVENT_INPUT_CONTEXT_NONE shall be used.
     *
     * Data:
     * - IMString
     *   An unified string key associated to the stored data, which are going
     *   to be deleted.
     *   A simple regular expression can be used to delete all keys and
     *   associated data, which are matched against the specified regular
     *   expression.
     *
     * Has reply event: No
     */
    IM_EVENT_STORAGE_DELETE,

    /**
     * Lists all keys in a storage component, which match a specified key
     * pattern.
     *
     * An event with this type shall be sent to IMBUS, if a component wants to
     * get available keys in a storage component.
     *
     * Possible producer: any components
     * Possible consumer: storage components
     * Possible observer: any components
     *
     * Can broadcast: No.
     *
     * Source ID: ID of the component, which sends this event
     *   Dest ID: IM_EVENT_DEST_DEFAULT, or ID of a specified storage
     *            component.
     *      ICID: IM_EVENT_INPUT_CONTEXT_NONE shall be used.
     *
     * Data:
     * - IMString
     *   A key pattern to be listed. Simple regular expression can be used.
     *
     * Has reply event: Yes
     * - Zero, or more IMString objects
     *   Available keys stored in the storage component, which match the
     *   specified key pattern.
     */
    IM_EVENT_STORAGE_LIST,

    /**
     * Add a watch into a storage component to monitor the modification of one
     * or more specified keys.
     *
     * An event with this type shall be sent to IMBUS, if a component wants to
     * monitor the modification of one or more specified keys stored in a
     * storage component.
     *
     * Possible producer: any components
     * Possible consumer: storage components
     * Possible observer: any components
     *
     * Can broadcast: No.
     *
     * Source ID: ID of the component, which sends this event
     *   Dest ID: IM_EVENT_DEST_DEFAULT, or ID of a specified storage
     *            component.
     *      ICID: IM_EVENT_INPUT_CONTEXT_NONE shall be used.
     *
     * Data:
     * - IMString
     *   A key or key pattern to be monitored. Simple regular expression can
     *   be used to match multiple keys.
     *
     * Has reply event: No
     */
    IM_EVENT_STORAGE_ADD_WATCH,

    /**
     * Remove one or more watch from a storage component.
     *
     * An event with this type shall be sent to IMBUS, if a component wants to
     * remove one or more watch for one or more specified key from a specified
     * storage component.
     *
     * Possible producer: any components
     * Possible consumer: storage components
     * Possible observer: any components
     *
     * Can broadcast: No.
     *
     * Source ID: ID of the component, which sends this event
     *   Dest ID: IM_EVENT_DEST_DEFAULT, or ID of a specified storage
     *            component.
     *      ICID: IM_EVENT_INPUT_CONTEXT_NONE shall be used.
     *
     * Data:
     * - IMString
     *   A key or key pattern for which the watch will be removed.
     *   Simple regular expression can be used to remove watches for multiple
     *   keys.
     *
     * Has reply event: No
     */
    IM_EVENT_STORAGE_REMOVE_WATCH,

    /**
     * Notifies a component that a watched key in a specified storage component
     * has been changed or deleted.
     *
     * An event with this type shall be sent to IMBUS, if a storage component
     * wants to notify a component that a key watched by the component has been
     * changed or deleted.
     *
     * Possible producer: stroage components
     * Possible consumer: any components
     * Possible observer: any components
     *
     * Can broadcast: No.
     *
     * Source ID: ID of the storage component, which sends this event
     *   Dest ID: ID of the component which is monitoring the specified key.
     *      ICID: IM_EVENT_INPUT_CONTEXT_NONE shall be used.
     *
     * Data:
     * - IMString
     *   The changed or deleted key, which is currently monitored by the
     *   destination compnent.
     * - New data associated to the key.
     *   Only available if the data associated to the key is changed, instead
     *   of deleted.
     *
     * Has reply event: No
     */
    IM_EVENT_STORAGE_WATCH_NOTIFY,


    /**
     * Calls IMBUS to hook a timeout event, that will be fired after a certain
     * time.
     *
     * An event with this type shall be sent to IMBUS, if a component wants to
     * hook a timeout event in IMBUS.
     * The timeout event will be fired by IMBUS after a specified time.
     *
     * Possible producer: any components
     * Possible consumer: IMBUS
     * Possible observer: any components
     *
     * Can broadcast: No.
     *
     * Source ID: ID of the component, which sends this event
     *   Dest ID: IM_EVENT_DEST_IMBUS shall be used
     *      ICID: IM_EVENT_INPUT_CONTEXT_NONE shall be used.
     *
     * Data:
     * - IMUInt32
     *   A specified ID of the timeout event inside the component scope, which
     *   can be used to cancel the timeout later.
     * - IMUInt32
     *   A specified timeout value, in milliseconds.
     * - IMBool
     *   Indicates if it's a periodical event. If it' a periodical event, then
     *   IMBUS will fire it periodically in interval specified by above timeout
     *   value. Otherwise it'll only be fired once after a specified timeout.
     * - IMEvent
     *   The event that will be fired by IMBUS. It can be an event of any type,
     *   but usually IM_EVENT_TIMEOUT_NOTIFY can be used for generic timeout
     *   notification.
     *
     * Has reply event: No
     */
    IM_EVENT_SET_TIMEOUT_EVENT,

    /**
     * Calls IMBUS to cancel a timeout event.
     *
     * An event with this type shall be sent to IMBUS, if a component wants
     * IMBUS to cancel a specified timeout event hooked by previous
     * IM_EVENT_SET_TIMEOUT_EVENT event.
     *
     * Possible producer: any components
     * Possible consumer: IMBUS
     * Possible observer: any components
     *
     * Can broadcast: No.
     *
     * Source ID: ID of the component, which sends this event
     *   Dest ID: IM_EVENT_DEST_IMBUS shall be used
     *      ICID: IM_EVENT_INPUT_CONTEXT_NONE shall be used.
     *
     * Data:
     * - IMUInt32
     *   ID of the timeout event to be cancelled.
     *
     * Has reply event: No
     */
    IM_EVENT_CANCEL_TIMEOUT_EVENT,

    /**
     * An event that can be used for generic timeout notification.
     *
     * This event can be used in the IMEvent parameter when sending
     * IM_EVENT_SET_TIMEOUT_EVENT to represent a generic timeout notification.
     *
     * Possible producer: IMBUS
     * Possible consumer: any components
     * Possible observer: any components
     *
     * Can broadcast: No.
     *
     * Source ID: ID of the component, which creates this event
     *   Dest ID: ID of the component, which shall consume this event, usually
     *            it should be same as the Source ID.
     *      ICID: Any valid input context ID can be used. It's up to the
     *            producer and consumer to determine the usage of this ID.
     *
     * Data:
     * - IMUInt32
     *   ID of the timeout event.
     * - Any additional data that can be interpreted by consumer.
     *
     * Has reply event: No
     */
    IM_EVENT_TIMEOUT_NOTIFY,

    /**
     * Notifies an UI component to show a notification.
     *
     * Possible producer: any components
     * Possible consumer: UI components
     * Possible observer: any components
     *
     * Can broadcast: No.
     *
     * Source ID: ID of the component, which creates this event
     *   Dest ID: ID of the UI component, which shall consume this event,
     *            Can be IM_EVENT_DEST_DEFAULT.
     *      ICID: IM_EVENT_INPUT_CONTEXT_NONE shall be used.
     *
     * Data:
     * - IMText
     *   Text of the notification to be shown.
     * - IMBool
     *   If true then audio or visual notification shall be used.
     *
     * Has reply event: No
     */
    IM_EVENT_SHOW_NOTIFICATION,

    IM_EVENT_USER_DEFINED_START = 32768,
};

IM_END_DECLS

#endif
/**  @} */

/*
vi:ts=4:nowrap:ai:expandtab
*/
